package cn.kgc.springboot.service.impl;

import cn.kgc.springboot.entity.User;
import cn.kgc.springboot.mapper.UserMapper;
import cn.kgc.springboot.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 课工场
 * @date 2024/8/14
 * @description
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public User getOne(Integer id) {

       return userMapper.selectById(id);
    }

    @Override
    public List<User> userList() {

        return userMapper.selectList();
    }
}
